<?php

namespace App\Http\Controllers\Mobile;


use App\Logics\MoneyLogic;

class MoneyController extends BaseController
{
    // 一般操作
    public function initialize()
    {
        parent::initialize();
    }

    // 用于收益明细
    public function profit()
    {
        $logic  = new MoneyLogic();
        $result = $logic->myProfit2($this->myUid);
        if($result === false){
            return $this->error($logic->getError());
        }

        return $this->success($result);
    }

    // 用于余额变化明细
    public function money()
    {
        $logic  = new MoneyLogic();
        $result = $logic->myMoney($this->myUid);
        if($result === false){
            return $this->error($logic->getError());
        }

        return $this->success($result);
    }

    // 提现明细
    public function withdraw()
    {
        $logic  = new MoneyLogic();
        $result = $logic->myWithdraw($this->myUid);
        if($result === false){
            return $this->error($logic->getError());
        }

        return $this->success($result);
    }

    // 提现
    public function onWithdraw()
    {
        $logic  = new MoneyLogic();
        $result = $logic->onWithdraw($this->myUid);
        if($result === false){
            return $this->error($logic->getError());
        }

        return $this->success($result);
    }

}


